/**
*      author: Y_Yao
*      created: 2024-11-15 15:23:32
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n = 1;
    cin >> n;
    int ret = 0;
    for(int i = 1;i <= n;i++)
    {
        int sum = 0;
        int a,b,c;
        cin >> a >> b >> c;
        sum += a;
        sum += b;
        sum += c;
        if(sum >= 2) ret++;
    }

    cout << ret << endl;
    return 0;
}